package gt.edu.usac.viewcontroller.backing.app;

import gt.edu.usac.model.am.AppModuleImpl;

import java.sql.CallableStatement;
import java.sql.SQLException;

import javax.faces.component.UISelectItems;
import javax.faces.component.html.HtmlForm;

import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;

import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCDataControl;
import oracle.adf.view.faces.component.core.data.CoreColumn;
import oracle.adf.view.faces.component.core.data.CoreTable;
import oracle.adf.view.faces.component.core.input.CoreSelectOneChoice;
import oracle.adf.view.faces.component.core.layout.CorePanelGroup;
import oracle.adf.view.faces.component.core.layout.CorePanelHeader;
import oracle.adf.view.faces.component.core.output.CoreMessages;
import oracle.adf.view.faces.component.core.output.CoreOutputText;
import oracle.adf.view.faces.component.html.HtmlBody;
import oracle.adf.view.faces.component.html.HtmlHead;
import oracle.adf.view.faces.component.html.HtmlHtml;

import oracle.jbo.ApplicationModule;
import oracle.jbo.JboException;
import oracle.jbo.Row;
import oracle.jbo.server.DBTransaction;

import oracle.jdbc.OracleTypes;

public class Test {


    private HtmlHtml html1;
    private HtmlHead head1;
    private HtmlBody body1;
    private CoreMessages messages1;
    private HtmlForm form1;
    private CorePanelGroup panelGroup1;
    private CorePanelGroup panelGroup2;
    private CoreSelectOneChoice navList1;
    private UISelectItems selectItems1;
    private CorePanelHeader panelHeader1;
    private CoreTable table2;
    private CoreColumn column23;
    private CoreOutputText outputText23;
    private CoreColumn column24;
    private CoreOutputText outputText24;
    private CoreColumn column25;
    private CoreOutputText outputText25;
    private CoreColumn column26;
    private CoreOutputText outputText26;
    private CoreColumn column27;
    private CoreOutputText outputText27;
    private CoreColumn column28;
    private CoreOutputText outputText28;
    private CoreColumn column29;
    private CoreOutputText outputText29;
    private CoreColumn column30;
    private CoreOutputText outputText30;
    private CoreColumn column31;
    private CoreOutputText outputText31;
    private CoreColumn column32;
    private CoreOutputText outputText32;
    private CoreColumn column33;
    private CoreOutputText outputText33;
    private CoreColumn column34;
    private CoreOutputText outputText34;
    private CoreColumn column35;
    private CoreOutputText outputText35;
    private CoreColumn column36;
    private CoreOutputText outputText36;
    private CoreColumn column37;
    private CoreOutputText outputText37;
    private CoreColumn column38;
    private CoreOutputText outputText38;
    private CoreColumn column39;
    private CoreOutputText outputText39;
    private CoreColumn column40;
    private CoreOutputText outputText40;
    private CoreColumn column41;
    private CoreOutputText outputText41;
    private CoreColumn column42;
    private CoreOutputText outputText42;
    private CoreColumn column43;
    private CoreOutputText outputText43;
    private CoreColumn column44;
    private CoreOutputText outputText44;

    public void setHtml1(HtmlHtml html1) {
        this.html1 = html1;
    }

    public HtmlHtml getHtml1() {
        return html1;
    }

    public void setHead1(HtmlHead head1) {
        this.head1 = head1;
    }

    public HtmlHead getHead1() {
        return head1;
    }

    public void setBody1(HtmlBody body1) {
        this.body1 = body1;
    }

    public HtmlBody getBody1() {
        return body1;
    }

    public void setMessages1(CoreMessages messages1) {
        this.messages1 = messages1;
    }

    public CoreMessages getMessages1() {
        return messages1;
    }

    public void setForm1(HtmlForm form1) {
        this.form1 = form1;
    }

    public HtmlForm getForm1() {
        return form1;
    }


   
    
    public static String callStoredFunction2(DBTransaction dbTransaction,String stmt, Object[] bindVars) {
           CallableStatement st = null;
           String result = null;
           
           try {
               st = dbTransaction.createCallableStatement("begin ?:=" + stmt + ";end;", 0);             
               st.registerOutParameter(1,OracleTypes.NUMBER);
               if (bindVars != null) {                           
                   for (int z = 0; z < bindVars.length; z++) {
                       st.setObject(z + 2, bindVars[z]);
                   }
               }
               st.execute();
               result = st.getString(1);
           } catch (SQLException e) {
               throw new JboException(e);
           } finally {
               if (st != null) {
                   try {
                       st.close();
                   } catch (SQLException e) {
                      e.printStackTrace();
                   }
               }
           }
           return result;
    }


    public void setPanelGroup1(CorePanelGroup panelGroup1) {
        this.panelGroup1 = panelGroup1;
    }

    public CorePanelGroup getPanelGroup1() {
        return panelGroup1;
    }


    public void setPanelGroup2(CorePanelGroup panelGroup2) {
        this.panelGroup2 = panelGroup2;
    }

    public CorePanelGroup getPanelGroup2() {
        return panelGroup2;
    }

    public void setNavList1(CoreSelectOneChoice navList1) {
        this.navList1 = navList1;
    }

    public CoreSelectOneChoice getNavList1() {
        return navList1;
    }

    public void setSelectItems1(UISelectItems selectItems1) {
        this.selectItems1 = selectItems1;
    }

    public UISelectItems getSelectItems1() {
        return selectItems1;
    }

    public void setPanelHeader1(CorePanelHeader panelHeader1) {
        this.panelHeader1 = panelHeader1;
    }

    public CorePanelHeader getPanelHeader1() {
        return panelHeader1;
    }


    public void setTable2(CoreTable table2) {
        this.table2 = table2;
    }

    public CoreTable getTable2() {
        return table2;
    }

    public void setColumn23(CoreColumn column23) {
        this.column23 = column23;
    }

    public CoreColumn getColumn23() {
        return column23;
    }

    public void setOutputText23(CoreOutputText outputText23) {
        this.outputText23 = outputText23;
    }

    public CoreOutputText getOutputText23() {
        return outputText23;
    }

    public void setColumn24(CoreColumn column24) {
        this.column24 = column24;
    }

    public CoreColumn getColumn24() {
        return column24;
    }

    public void setOutputText24(CoreOutputText outputText24) {
        this.outputText24 = outputText24;
    }

    public CoreOutputText getOutputText24() {
        return outputText24;
    }

    public void setColumn25(CoreColumn column25) {
        this.column25 = column25;
    }

    public CoreColumn getColumn25() {
        return column25;
    }

    public void setOutputText25(CoreOutputText outputText25) {
        this.outputText25 = outputText25;
    }

    public CoreOutputText getOutputText25() {
        return outputText25;
    }

    public void setColumn26(CoreColumn column26) {
        this.column26 = column26;
    }

    public CoreColumn getColumn26() {
        return column26;
    }

    public void setOutputText26(CoreOutputText outputText26) {
        this.outputText26 = outputText26;
    }

    public CoreOutputText getOutputText26() {
        return outputText26;
    }

    public void setColumn27(CoreColumn column27) {
        this.column27 = column27;
    }

    public CoreColumn getColumn27() {
        return column27;
    }

    public void setOutputText27(CoreOutputText outputText27) {
        this.outputText27 = outputText27;
    }

    public CoreOutputText getOutputText27() {
        return outputText27;
    }

    public void setColumn28(CoreColumn column28) {
        this.column28 = column28;
    }

    public CoreColumn getColumn28() {
        return column28;
    }

    public void setOutputText28(CoreOutputText outputText28) {
        this.outputText28 = outputText28;
    }

    public CoreOutputText getOutputText28() {
        return outputText28;
    }

    public void setColumn29(CoreColumn column29) {
        this.column29 = column29;
    }

    public CoreColumn getColumn29() {
        return column29;
    }

    public void setOutputText29(CoreOutputText outputText29) {
        this.outputText29 = outputText29;
    }

    public CoreOutputText getOutputText29() {
        return outputText29;
    }

    public void setColumn30(CoreColumn column30) {
        this.column30 = column30;
    }

    public CoreColumn getColumn30() {
        return column30;
    }

    public void setOutputText30(CoreOutputText outputText30) {
        this.outputText30 = outputText30;
    }

    public CoreOutputText getOutputText30() {
        return outputText30;
    }

    public void setColumn31(CoreColumn column31) {
        this.column31 = column31;
    }

    public CoreColumn getColumn31() {
        return column31;
    }

    public void setOutputText31(CoreOutputText outputText31) {
        this.outputText31 = outputText31;
    }

    public CoreOutputText getOutputText31() {
        return outputText31;
    }

    public void setColumn32(CoreColumn column32) {
        this.column32 = column32;
    }

    public CoreColumn getColumn32() {
        return column32;
    }

    public void setOutputText32(CoreOutputText outputText32) {
        this.outputText32 = outputText32;
    }

    public CoreOutputText getOutputText32() {
        return outputText32;
    }

    public void setColumn33(CoreColumn column33) {
        this.column33 = column33;
    }

    public CoreColumn getColumn33() {
        return column33;
    }

    public void setOutputText33(CoreOutputText outputText33) {
        this.outputText33 = outputText33;
    }

    public CoreOutputText getOutputText33() {
        return outputText33;
    }

    public void setColumn34(CoreColumn column34) {
        this.column34 = column34;
    }

    public CoreColumn getColumn34() {
        return column34;
    }

    public void setOutputText34(CoreOutputText outputText34) {
        this.outputText34 = outputText34;
    }

    public CoreOutputText getOutputText34() {
        return outputText34;
    }

    public void setColumn35(CoreColumn column35) {
        this.column35 = column35;
    }

    public CoreColumn getColumn35() {
        return column35;
    }

    public void setOutputText35(CoreOutputText outputText35) {
        this.outputText35 = outputText35;
    }

    public CoreOutputText getOutputText35() {
        return outputText35;
    }

    public void setColumn36(CoreColumn column36) {
        this.column36 = column36;
    }

    public CoreColumn getColumn36() {
        return column36;
    }

    public void setOutputText36(CoreOutputText outputText36) {
        this.outputText36 = outputText36;
    }

    public CoreOutputText getOutputText36() {
        return outputText36;
    }

    public void setColumn37(CoreColumn column37) {
        this.column37 = column37;
    }

    public CoreColumn getColumn37() {
        return column37;
    }

    public void setOutputText37(CoreOutputText outputText37) {
        this.outputText37 = outputText37;
    }

    public CoreOutputText getOutputText37() {
        return outputText37;
    }

    public void setColumn38(CoreColumn column38) {
        this.column38 = column38;
    }

    public CoreColumn getColumn38() {
        return column38;
    }

    public void setOutputText38(CoreOutputText outputText38) {
        this.outputText38 = outputText38;
    }

    public CoreOutputText getOutputText38() {
        return outputText38;
    }

    public void setColumn39(CoreColumn column39) {
        this.column39 = column39;
    }

    public CoreColumn getColumn39() {
        return column39;
    }

    public void setOutputText39(CoreOutputText outputText39) {
        this.outputText39 = outputText39;
    }

    public CoreOutputText getOutputText39() {
        return outputText39;
    }

    public void setColumn40(CoreColumn column40) {
        this.column40 = column40;
    }

    public CoreColumn getColumn40() {
        return column40;
    }

    public void setOutputText40(CoreOutputText outputText40) {
        this.outputText40 = outputText40;
    }

    public CoreOutputText getOutputText40() {
        return outputText40;
    }

    public void setColumn41(CoreColumn column41) {
        this.column41 = column41;
    }

    public CoreColumn getColumn41() {
        return column41;
    }

    public void setOutputText41(CoreOutputText outputText41) {
        this.outputText41 = outputText41;
    }

    public CoreOutputText getOutputText41() {
        return outputText41;
    }

    public void setColumn42(CoreColumn column42) {
        this.column42 = column42;
    }

    public CoreColumn getColumn42() {
        return column42;
    }

    public void setOutputText42(CoreOutputText outputText42) {
        this.outputText42 = outputText42;
    }

    public CoreOutputText getOutputText42() {
        return outputText42;
    }

    public void setColumn43(CoreColumn column43) {
        this.column43 = column43;
    }

    public CoreColumn getColumn43() {
        return column43;
    }

    public void setOutputText43(CoreOutputText outputText43) {
        this.outputText43 = outputText43;
    }

    public CoreOutputText getOutputText43() {
        return outputText43;
    }

    public void setColumn44(CoreColumn column44) {
        this.column44 = column44;
    }

    public CoreColumn getColumn44() {
        return column44;
    }

    public void setOutputText44(CoreOutputText outputText44) {
        this.outputText44 = outputText44;
    }

    public CoreOutputText getOutputText44() {
        return outputText44;
    }
}
